﻿using PHRClient.DoctorForms.PatientRegister;
using PHRClient.PatientForms;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace PHRClient.PatientForms
{
    public partial class PatientDetails : Form
    {
        public static FamilyMedicalHistoryDetails familyMedicalHistory = null;
        public static OtherRiskFactorsDetails otherRiskFactors = null;
        public static PastMedicalHistoryDetails pastMedicalHistory = null;
        public static PresentMedicalHistoryDetails presentMedicalHistory = null;
        public static GeneralInformationDetails generalInformation = null;

        public static History historyCh = null;
        public static History2 history2 = null;
        public static History3 history3 = null;
        public static History4 history4 = null;
        public static History5 history5 = null;

        public PatientDetails()
        {
            InitializeComponent();
            familyMedicalHistory = new FamilyMedicalHistoryDetails();
            otherRiskFactors = new OtherRiskFactorsDetails();
            pastMedicalHistory = new PastMedicalHistoryDetails();
            presentMedicalHistory = new PresentMedicalHistoryDetails();
            generalInformation = new GeneralInformationDetails();

            historyCh = new History();
            history2 = new History2();
            history3 = new History3();
            history4 = new History4();
            history5 = new History5();

            RegisterContainer.Controls.Clear();
            RegisterContainer.Controls.Add(history2);
            history2.Show();

            this.TopLevel = false;
            this.AutoScroll = true;
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            this.Dock = DockStyle.Fill;

            PHRDetails.DataContainer.Controls.Clear();
            PHRDetails.DataContainer.Controls.Add(this);
        }

        private void generalInfo_Click(object sender, EventArgs e)
        {
            RegisterContainer.Controls.Clear();
            RegisterContainer.Controls.Add(generalInformation);
            generalInformation.Show();
        }

        private void presentMH_Click(object sender, EventArgs e)
        {
            RegisterContainer.Controls.Clear();
            RegisterContainer.Controls.Add(presentMedicalHistory);
            presentMedicalHistory.Show();
        }

        private void pastMH_Click(object sender, EventArgs e)
        {
            RegisterContainer.Controls.Clear();
            RegisterContainer.Controls.Add(pastMedicalHistory);
            pastMedicalHistory.Show();
        }

        private void familyMH_Click(object sender, EventArgs e)
        {
            RegisterContainer.Controls.Clear();
            RegisterContainer.Controls.Add(familyMedicalHistory);
            familyMedicalHistory.Show();
        }

        private void otherRF_Click(object sender, EventArgs e)
        {
            RegisterContainer.Controls.Clear();
            RegisterContainer.Controls.Add(otherRiskFactors);
            otherRiskFactors.Show();
        }

        private void register_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void history2_Click(object sender, EventArgs e)
        {
            RegisterContainer.Controls.Clear();
            RegisterContainer.Controls.Add(history2);
            history2.Show();
        }

        private void historyButton3_Click(object sender, EventArgs e)
        {
            RegisterContainer.Controls.Clear();
            RegisterContainer.Controls.Add(history3);
            history3.Show();
        }

        private void historyButton4_Click(object sender, EventArgs e)
        {
            RegisterContainer.Controls.Clear();
            RegisterContainer.Controls.Add(history4);
            history4.Show();
        }

        private void historyButton5_Click(object sender, EventArgs e)
        {
            RegisterContainer.Controls.Clear();
            RegisterContainer.Controls.Add(history5);
            history5.Show();
        }

        private void historyCharts_Click(object sender, EventArgs e)
        {
            RegisterContainer.Controls.Clear();
            RegisterContainer.Controls.Add(historyCh);
            historyCh.Show();
        }
    }
}
